﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using VideoClassLibrary.BusinessLogicLayer;
public partial class Report_VideoViewDetailList : AdminUserBase
{
    VideoCommentModule vm = new VideoCommentModule();
    protected void Page_Load(object sender, EventArgs e)
    {
        BindData();
    }
    public void BindData()
    {
        DataSet ds = new DataSet();
        int courseid=Convert.ToInt32(Request.QueryString["courseid"].ToString());
        ds = vm.GetVideoViewList(courseid, this.SchoolID,-1);
        Repeater1.DataSource = getPage(ds);
        Repeater1.DataBind();

    }
    public PagedDataSource getPage(DataSet ds)
    {
        this.pager.RecordCount = ds.Tables[0].Rows.Count;
        PagedDataSource pds = new PagedDataSource();
        pds.DataSource = ds.Tables[0].DefaultView;
        pds.AllowPaging = true;
        pds.CurrentPageIndex = pager.CurrentPageIndex - 1;
        pds.PageSize = pager.PageSize;
        return pds;
    }
    protected void pager_PageChanged(object sender, EventArgs e)
    {
        BindData();

    }
}
